<?php
	/**
	 * 
	 */
    class Avater extends APIBase {
		
		public $tag = "Avater";
		
        public function before() {
			$this->initMysql();
    		return true;
		}
		
		public function logic() {
            
			if($this->param['Avater']=='' || !isset($this->param['Avater'])){
				
			   $this->returnError(310, "请选择头像！");
			}
			
			$avater = $this->param['Avater'];
			$this->data_redis->hSet("hu:{$this->uid}",'avater_url',$avater);

			$this->returnData(array());
		}
		
       	public function after() {
    		$this->deinitDataRedis();
			$this->deinitMysql();
		}
    }
?>
